
<template>
    <p>name: {{name}}, age: {{propsRef}}</p>

</template>

<script>
import { toRef } from 'vue'

export default {
  name: 'ToRefSon',
  props: {
    name: {
      type: String,
      default: ''
    },
    age: {
      type: Number
    }
  },
  setup (props) {
    // const propsRef = toRefs(props)
    const propsRef = toRef(props, 'age')

    return {
      propsRef
    }
  }
}

</script>
